//
//  pictureQualitiController.m
//  SinaWeibo
//
//  Created by Apple on 16/8/22.
//  Copyright © 2016年 Apple. All rights reserved.
//

#import "pictureQualitiController.h"

#import "GroupModel.h"
#import "ItemSwitchModel.h"
#import "ItemArrowModel.h"
#import "SettingViewController.h"
#import "SettingCell.h"
#import "pictureQualitiController.h"
#import "ItemLogoutModel.h"
#import "ItemPictureQualityModel.h"


@interface pictureQualitiController ()



@end

@implementation pictureQualitiController

/**
 *  重写setData方法讲
 *
 *  @return <#return value description#>
 */
-(NSArray *)setData{
    
    //.设置数据模型

    ItemPictureQualityModel *item11 = [ItemPictureQualityModel itemWithTitle:@"自定义" ];
    item11.subTitle = @"移动网络加载普通照片，WIFI加载高清照片";
    ItemPictureQualityModel *item12 = [ItemPictureQualityModel itemWithTitle:@"高清"];
    item12.subTitle = @"流量少，速度快";
    ItemPictureQualityModel *item13 = [ItemPictureQualityModel itemWithTitle:@"普通"];
    item13.subTitle = @"质量高，图片清";
    item13.isCheck = YES;
    GroupModel *group1 = [GroupModel groupWithItems:@[item11,item12,item13]];
    
    NSArray *dataArray = @[group1];
    
    return dataArray;
    
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    //设置导航栏左按钮
    self.navigationItem.leftBarButtonItem = [UIBarButtonItem setNavItemWithTitle:@"返回" target:self action:@selector(back)];

}

-(void)back{
    
    [self.navigationController popViewControllerAnimated:YES];
    
}




#pragma mark - Table view data source



#pragma mark - Table view delegate

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
    GroupModel *group = self.dataArray[indexPath.section];
    
    group.index = indexPath.row;
    
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
    
    [self.tableView reloadData];
    
}





@end
